<template>
  <!-- 首页用户卡片 -- 推荐部分 -->
  <div class="user-card">
      <div class="top">
          <div class="headshot">
              <img src="./img/1.jpg" alt="用户头像">
              <a href="javascript:;"></a>
          </div>
          <div class="desc">
              <div class="name">啦啦啦就哦</div>
              <div>
                  <a class="level" href="">Lv.6</a>
              </div>
              <div class="btn">
                  <span>签到</span>
              </div>
          </div>
      </div>
      <div class="btm">
          <ul>
              <li>
                  <div class="num">0</div>
                  <div>动态</div>
              </li>
              <li class="line"></li>
              <li>
                  <div class="num">3</div>
                  <div>关注</div>
              </li>
              <li class="line"></li>
              <li>
                  <div class="num">1</div>
                  <div>粉丝</div>
              </li>
          </ul>
      </div>
  </div>
</template>

<script>
export default {
    name:'user-card'
}
</script>

<style lang="scss" scoped>
    .user-card{
        width: 252px;
        height: 185px;
        background-color: #f6f6f6;
        border-bottom: 1px solid #d3d3d3;
        .top{
            display: flex;
            .headshot{
                width: 103px;
                height: 103px;
                padding: 20px;
                box-sizing: border-box;
                position: relative;
                img{
                    width: 80px;
                    height: 80px;
                }
                a{
                    position: absolute;
                    top: 17px;
                    left: 17px;
                    width: 80px;
                    height: 80px;
                    padding: 2px;
                    border: 1px solid #dadada;
                }
            }
            .desc{
                width: 149px;
                margin-top: 20px;
                margin-left: 20px;
                .name{
                    color: #000;
                    font-weight: bold;
                    font-size: 14px;
                    line-height: 20px;
                    margin-bottom: 5px;
                    &:hover{
                        text-decoration: underline;
                    }
                }
                .level{
                    // width: 20px;
                    color: #999;
                    line-height: 16px;
                    text-align: center;
                    height: 16px;
                    width: 45px;
                    font-size: 12px;
                    // padding-left: 25px;
                    display: inline-block;
                    border: 1px solid #999;
                    border-radius: 18px;
                    &:hover{
                        color: #777;
                        border: 1px solid #777;
                    }
                    // 背景图不对
                    // background: url('@/assets/icon2.png') no-repeat;
                    // background-position: -130px -64px;
                    // background-size: 130px 538px;
                }
                .btn{
                    cursor: pointer;
                    width: 60px;
                    height: 30px;
                    line-height: 30px;
                    padding-right: 4px;
                    color: #fff;
                    font-size: 12px;
                    background: url('@/assets/button2.png') no-repeat;
                    background-position: right -428px;
                    margin-top: 8px;
                    &:hover{
                        background-position: right -510px;
                        span{
                            background-position: 0 -469px;
                        }
                    }
                    span{
                        display: inline-block;
                        padding: 0 15px 0 20px;
                        background: url('@/assets/button2.png') no-repeat;
                        background-position: 0 -387px;
                    }
                }
            }
        }
        .btm{
            margin: 10px;
            ul{
                color: #666;
                font-size: 12px;
                margin-top: 25px;
                .line{
                    // 宽度为 1px的背景，渲染不成功，总会有一个比较粗
                    // width: 1px;
                    height: 40px;
                    // background-color: #ccc;
                    border-left: 1px solid #e4e4e4;
                }
                li{
                    float: left;
                    margin: 0 15px;
                    div{
                        line-height: 20px;
                        text-align: center;
                    }
                    .num{
                        font-size: 18px;
                    }
                }
            }
        }
    }

</style>